package com.zhongxi.guoyuan.view.rewardCoin;

import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.view.View;

import com.zhongxi.guoyuan.R;
import com.zhongxi.guoyuan.adapter.rewardCoin.RewardCoinListAdapter;
import com.zhongxi.guoyuan.base.BaseActivity;
import com.zhongxi.guoyuan.entity.coinStore.HotGoodsData;
import com.zhongxi.guoyuan.entity.projectItem.ProjectItemData;

import java.util.ArrayList;

import butterknife.Bind;
import butterknife.ButterKnife;

import static com.zhongxi.guoyuan.R.id.lvList;

public class HotRewardCoinActivity extends BaseActivity implements View.OnClickListener {

    @Bind(R.id.tabLayout)
    TabLayout tabLayout;
    @Bind(R.id.viewPager)
    ViewPager viewPager;
    private RewardCoinListAdapter adapter;
    private ArrayList<HotGoodsData> data;
    private ArrayList<ProjectItemData> category;

    @Override
    protected void initView() {
        super.initView();
        setContentView(R.layout.activity_hot_coin_goods);
        ButterKnife.bind(this);
        initTitle();
        tvTitle.setText("秒杀抢购");
        data = (ArrayList<HotGoodsData>) getIntent().getSerializableExtra("datas");
        category = (ArrayList<ProjectItemData>) getIntent().getSerializableExtra("category");
    }

    @Override
    protected void initData() {
        super.initData();
        adapter = new RewardCoinListAdapter(context, data);
//        lvList.setAdapter(adapter);
    }

    @Override
    protected void initEvent() {
        super.initEvent();
        ivBack.setOnClickListener(this);
//        lvList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
//            @Override
//            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//                Intent intent = new Intent(context, RewardCoinDetailActivity.class);
//                intent.putExtra("gid", data.get(position - 1).getId());
//                startActivity(intent);
//            }
//        });
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.ivBack:
                finish();
                break;
        }
    }

}
